package net.wavorizer.control;

import com.google.wave.api.ProfileServlet;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;

import net.wavorizer.util.Utils;

public class BotProfiler extends ProfileServlet
{
    private String profileAvatarURL;
    private String profileName;
    private String profilePageURL;

    public void init(ServletConfig config) throws ServletException {
        super.init(config);
        profileAvatarURL = Utils.remNull(config.getInitParameter("PROFILE_AVATAR_URL"));
        profileName = Utils.remNull(config.getInitParameter("PROFILE_NAME"));
        profilePageURL = Utils.remNull(config.getInitParameter("PROFILE_PAGE_URL"));
    }

    @Override
    public String getRobotName() {
        return profileName;
    }

    @Override
    public String getRobotAvatarUrl() {
        return profileAvatarURL;
    }

    @Override
    public String getRobotProfilePageUrl() {
        return profilePageURL;
    }

}
